<!DOCTYPE html>
<html>
	<head lang="en" >
		<meta charset="UTF-8">
		<title>统计</title>
	</head>
	<body>
		<script type="text/javascript">
			var aaa=["America","Greece","Britain","Canada","China"];
			var number = 0;
			document.write("在以下字符中：" + "<br />");
			for (var i in aaa) {
				document.write(aaa[i] + "<br />");
				if(aaa[i].indexOf("a")!=-1){
					number++;
					continue;
				}
				if(aaa[i].indexOf("A")!=-1){
					number++;
					continue;
				}
			}
			document.write("共有"+number+"个字符串中包含a或A");
			
			
		</script>
		
		
		
	</body>
</html>
